package cn.iocoder.yudao.module.cont.job;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.module.cont.service.deal.DealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author HAIYUN
 * @Date 2023/12/20 16:44
 * @Description //定时任务-提醒收付款到期
 */
@Component
@Slf4j
public class DealPayJob implements JobHandler {

    @Resource
    private DealService dealService;


    /**
     * 执行任务
     *
     * @param param 参数
     * @return 结果
     * @throws Exception 异常
     */
    @Override
    public String execute(String param) throws Exception {
        Long sendHtCount = dealService.sendPayCount();
        return StrUtil.format("提示临近收款合同 {} 个", sendHtCount);
    }
}
